package com.example.qt.ptplatform.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.qt.ptplatform.dto.TorrentReportDataDTO;
import com.example.qt.ptplatform.entity.TorrentReport;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TorrentReportMapper extends BaseMapper<TorrentReport> {
    @Select("SELECT uploaded, downloaded FROM torrent_report WHERE user_id = #{userId}")
    List<TorrentReportDataDTO> selectByUserId(@Param("userId") int userId);
}

